package com.maimang.platform.dsp.service.impl;

import com.maimang.platform.dsp.entity.FundDailyDetail;
import com.maimang.platform.dsp.mapper.FundDailyDetailMapper;
import com.maimang.platform.dsp.service.FundDailyDetailService;
import com.maimang.platform.lang.ConvertUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Rocky
 * @version 1.0.0
 * @classname FundDailyDetailServiceImpl
 * @description <br>账号流水明细服务层实现类</br>
 * @date 2019-08-05 16:29:06
 * @email jintaozhao@qq.com
 */
@Service
public class FundDailyDetailServiceImpl implements FundDailyDetailService {

	@Autowired
	private FundDailyDetailMapper fundDailyDetailMapper;

	/**
	 * 查询账号流水明细信息
	 *
	 * @param advertiserId 账号流水明细ID
	 * @return 账号流水明细信息
	 */
	@Override
	public FundDailyDetail selectFundDailyDetailById(Integer advertiserId) {
		return fundDailyDetailMapper.selectFundDailyDetailById(advertiserId);
	}

	/**
	 * 查询账号流水明细列表
	 *
	 * @param fundDailyDetail 账号流水明细信息
	 * @return 账号流水明细集合
	 */
	@Override
	public List<FundDailyDetail> selectFundDailyDetailList(FundDailyDetail fundDailyDetail) {
		return fundDailyDetailMapper.selectFundDailyDetailList(fundDailyDetail);
	}

	/**
	 * 查询账号流水明细列表
	 *
	 * @param advertiserId 账号id
	 * @return 账号流水明细集合
	 */
	@Override
	public List<FundDailyDetail> selectFundDailyDetailList(Integer advertiserId) {
		FundDailyDetail fundDailyDetail = new FundDailyDetail();
		fundDailyDetail.setAdvertiserId(advertiserId);
		return fundDailyDetailMapper.selectFundDailyDetailList(fundDailyDetail);
	}

	/**
	 * 新增账号流水明细
	 *
	 * @param fundDailyDetail 账号流水明细信息
	 * @return 结果
	 */
	@Override
	public int insertFundDailyDetail(FundDailyDetail fundDailyDetail) {
		return fundDailyDetailMapper.insertFundDailyDetail(fundDailyDetail);
	}

	/**
	 * 修改账号流水明细
	 *
	 * @param fundDailyDetail 账号流水明细信息
	 * @return 结果
	 */
	@Override
	public int updateFundDailyDetail(FundDailyDetail fundDailyDetail) {
		return fundDailyDetailMapper.updateFundDailyDetail(fundDailyDetail);
	}

	/**
	 * 删除账号流水明细对象
	 *
	 * @param ids 需要删除的数据ID
	 * @return 结果
	 */
	@Override
	public int deleteFundDailyDetailByIds(String ids) {
		return fundDailyDetailMapper.deleteFundDailyDetailByIds(ConvertUtils.toStrArray(ids));
	}

	/**
	 * @param advertiserId    广告主id
	 * @param transactionType 流水类型：RECHARGE， TRANSFER
	 * @param startDate       开始日期
	 * @param endDate         结束日期
	 * @param page
	 * @param pageSize
	 * @return
	 */
	@Override
	public List<FundDailyDetail> getFundDailyDetail(Integer advertiserId, String transactionType, String startDate, String endDate, int page, int pageSize) {
		return null;
	}

}
